<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
<html xmlns='http://www.w3.org/1999/xhtml'>
  <head>
    <title> itemlist </title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" >
    <?php htmlhead(); ?>
  </head>
  
  <body>
    
    <div class="actbar menuborder">
      <ul>
        
      </ul>
      <ul class="pages">
        <li><?php echo '共'.$navi['total'].'条 ',$navi['page'], '/', $navi['pages'];?>页</li>
        <li>
        <?php
          if($navi['page']==1) {
            echo('<a href="?view=item_list&page='.($navi['page']+1).'">下一页</a> ');
          }
          elseif($navi['page']==$navi['pages']){
            echo('<a href="?view=item_list&page='.($navi['page']-1).'">上一页</a> ');
          }
          else {
            echo('<a href="?view=item_list&page='.($navi['page']-1).'">上一页</a> ');
            echo('<a href="?view=item_list&page='.($navi['page']+1).'">下一页</a> ');
          }
        ?>
        </li>
      </ul>
    </div>
    
    <table class="table">
      <thead>
        <tr>
          <th style="width:40px;">物品ID</th>
          <th style="width:200px;">物品名称</th>
          <th style="width:80px;">拾取者</th>
          <th style="width:40px;">花费</th>
          <th style="width:120px;">拾取时间</th>
          <th style="width:auto;">对应事件</th>
          <th style="width:100px;">操作</th>
        </tr>        
      </thead>
      <tbody>
      <?php
        foreach($data as $_=>$v) {
          echo('<tr>');
          echo(' <td>'.$v['item_id'].'</td>');
          echo(' <td>');
          echo('<a class="tip" rel="item,'.$v['item_id'].'"><span  style="font-weight:bold;color:#'.$v['item_color'].';">['.$v['item_name'].']</span></a>');
          if($v['item_count']>1) echo(' x '. $v['item_count']);
          echo('</td>');
          echo(' <td>'.$v['item_looter'].'</td>');
          echo(' <td>'.number_format($v['item_score'],2,'.','').'</td>');
          echo(' <td>'.date("Y-m-d H:i:s",$v['loot_time']).'</td>');
          echo(' <td>'.$v['event_name'].'</td>');
          echo(' <td>');
          echo('  <span class="acticon actedit"></span>');
          echo(' </td>');
          echo('</tr>');
        }
      ?>
      </tbody>
    </table>
    
    <script>
    <?php echo getTips(); ?>
    </script>
    
</body>
</html>